package com.msda.rabbitmq;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class MultiDelayMessage<T> {
    private T data;
    private List<Long> delayMills;

    public Long removeNextDelay(){
        return delayMills.remove(0);
    }

    public boolean hasNextDelay(){
        return !delayMills.isEmpty();
    }

}
